function Distributor(params){ 
	 
}

Distributor.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new Distributor.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new Distributor.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new Distributor.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.id=function(id){if(this.proxy)return this.getProxy().id(id);  this.put("id", id);return this;};
	/** and id is null */
	this.idNull=function(){if(this.proxy)return this.getProxy().idNull();if(this.get("idNot")==null)this.put("idNot", "");this.put("id", null);return this;};
	/** not .... */
	this.idNot=function(){if(this.proxy)return this.getProxy().idNot();this.put("idNot", "not");return this;};
	this.idNotNull=function(){if(this.proxy)return this.getProxy().idNotNull();this.put("idNot", "not");this.put("id", null);return this;};
	this.idNot=function(id){if(this.proxy)return this.getProxy().idNot(id);this.put("idNot", "not");this.put("id", id);return this;};
		
	/** and id <= ? */
	this.idMin=function(min){if(this.proxy)return this.getProxy().idMin(min);this.put("idMin", min);return this;};
	/** and id >= ? */
	this.idMax=function(max){if(this.proxy)return this.getProxy().idMax(max);this.put("idMax", max);return this;};
		
		
	this.idIn=function(ids){
		if(this.proxy)return this.getProxy().idIn(ids);  this.put("idIn", ids);return this;
	};	
		 
	
	
	/** 配送商名称 [非空]       **/
	this.name=function(name){if(this.proxy)return this.getProxy().name(name);  this.put("name", name);return this;};
	/** and name is null */
	this.nameNull=function(){if(this.proxy)return this.getProxy().nameNull();if(this.get("nameNot")==null)this.put("nameNot", "");this.put("name", null);return this;};
	/** not .... */
	this.nameNot=function(){if(this.proxy)return this.getProxy().nameNot();this.put("nameNot", "not");return this;};
	this.nameNotNull=function(){if(this.proxy)return this.getProxy().nameNotNull();this.put("nameNot", "not");this.put("name", null);return this;};
	this.nameNot=function(name){if(this.proxy)return this.getProxy().nameNot(name);this.put("nameNot", "not");this.put("name", name);return this;};
		
		 
	
	
	/** 店面图片        **/
	this.shopPicture=function(shopPicture){if(this.proxy)return this.getProxy().shopPicture(shopPicture);  this.put("shopPicture", shopPicture);return this;};
	/** and shop_picture is null */
	this.shopPictureNull=function(){if(this.proxy)return this.getProxy().shopPictureNull();if(this.get("shopPictureNot")==null)this.put("shopPictureNot", "");this.put("shopPicture", null);return this;};
	/** not .... */
	this.shopPictureNot=function(){if(this.proxy)return this.getProxy().shopPictureNot();this.put("shopPictureNot", "not");return this;};
	this.shopPictureNotNull=function(){if(this.proxy)return this.getProxy().shopPictureNotNull();this.put("shopPictureNot", "not");this.put("shopPicture", null);return this;};
	this.shopPictureNot=function(shopPicture){if(this.proxy)return this.getProxy().shopPictureNot(shopPicture);this.put("shopPictureNot", "not");this.put("shopPicture", shopPicture);return this;};
		
		 
	
	
	/** 手机号 [非空]       **/
	this.mobile=function(mobile){if(this.proxy)return this.getProxy().mobile(mobile);  this.put("mobile", mobile);return this;};
	/** and mobile is null */
	this.mobileNull=function(){if(this.proxy)return this.getProxy().mobileNull();if(this.get("mobileNot")==null)this.put("mobileNot", "");this.put("mobile", null);return this;};
	/** not .... */
	this.mobileNot=function(){if(this.proxy)return this.getProxy().mobileNot();this.put("mobileNot", "not");return this;};
	this.mobileNotNull=function(){if(this.proxy)return this.getProxy().mobileNotNull();this.put("mobileNot", "not");this.put("mobile", null);return this;};
	this.mobileNot=function(mobile){if(this.proxy)return this.getProxy().mobileNot(mobile);this.put("mobileNot", "not");this.put("mobile", mobile);return this;};
		
		 
	
	
	/** 联系人        **/
	this.contacts=function(contacts){if(this.proxy)return this.getProxy().contacts(contacts);  this.put("contacts", contacts);return this;};
	/** and contacts is null */
	this.contactsNull=function(){if(this.proxy)return this.getProxy().contactsNull();if(this.get("contactsNot")==null)this.put("contactsNot", "");this.put("contacts", null);return this;};
	/** not .... */
	this.contactsNot=function(){if(this.proxy)return this.getProxy().contactsNot();this.put("contactsNot", "not");return this;};
	this.contactsNotNull=function(){if(this.proxy)return this.getProxy().contactsNotNull();this.put("contactsNot", "not");this.put("contacts", null);return this;};
	this.contactsNot=function(contacts){if(this.proxy)return this.getProxy().contactsNot(contacts);this.put("contactsNot", "not");this.put("contacts", contacts);return this;};
		
		 
	
	
	/** 密码 [非空]       **/
	this.password=function(password){if(this.proxy)return this.getProxy().password(password);  this.put("password", password);return this;};
	/** and password is null */
	this.passwordNull=function(){if(this.proxy)return this.getProxy().passwordNull();if(this.get("passwordNot")==null)this.put("passwordNot", "");this.put("password", null);return this;};
	/** not .... */
	this.passwordNot=function(){if(this.proxy)return this.getProxy().passwordNot();this.put("passwordNot", "not");return this;};
	this.passwordNotNull=function(){if(this.proxy)return this.getProxy().passwordNotNull();this.put("passwordNot", "not");this.put("password", null);return this;};
	this.passwordNot=function(password){if(this.proxy)return this.getProxy().passwordNot(password);this.put("passwordNot", "not");this.put("password", password);return this;};
		
		 
	
	
	/** 配送商地址        **/
	this.address=function(address){if(this.proxy)return this.getProxy().address(address);  this.put("address", address);return this;};
	/** and address is null */
	this.addressNull=function(){if(this.proxy)return this.getProxy().addressNull();if(this.get("addressNot")==null)this.put("addressNot", "");this.put("address", null);return this;};
	/** not .... */
	this.addressNot=function(){if(this.proxy)return this.getProxy().addressNot();this.put("addressNot", "not");return this;};
	this.addressNotNull=function(){if(this.proxy)return this.getProxy().addressNotNull();this.put("addressNot", "not");this.put("address", null);return this;};
	this.addressNot=function(address){if(this.proxy)return this.getProxy().addressNot(address);this.put("addressNot", "not");this.put("address", address);return this;};
		
		 
	
	
	/** 所在地  [Region]      **/
	this.location=function(location){if(this.proxy)return this.getProxy().location(location);  this.put("location", location);return this;};
	/** and location is null */
	this.locationNull=function(){if(this.proxy)return this.getProxy().locationNull();if(this.get("locationNot")==null)this.put("locationNot", "");this.put("location", null);return this;};
	/** not .... */
	this.locationNot=function(){if(this.proxy)return this.getProxy().locationNot();this.put("locationNot", "not");return this;};
	this.locationNotNull=function(){if(this.proxy)return this.getProxy().locationNotNull();this.put("locationNot", "not");this.put("location", null);return this;};
	this.locationNot=function(location){if(this.proxy)return this.getProxy().locationNot(location);this.put("locationNot", "not");this.put("location", location);return this;};
		
		
	this.locationIn=function(ids){
		if(this.proxy)return this.getProxy().locationIn(ids);  this.put("locationIn", ids);return this;
	};	
		 
	
	
	/** 会员信息 [非空] [Member]      **/
	this.member=function(member){if(this.proxy)return this.getProxy().member(member);  this.put("member", member);return this;};
	/** and member is null */
	this.memberNull=function(){if(this.proxy)return this.getProxy().memberNull();if(this.get("memberNot")==null)this.put("memberNot", "");this.put("member", null);return this;};
	/** not .... */
	this.memberNot=function(){if(this.proxy)return this.getProxy().memberNot();this.put("memberNot", "not");return this;};
	this.memberNotNull=function(){if(this.proxy)return this.getProxy().memberNotNull();this.put("memberNot", "not");this.put("member", null);return this;};
	this.memberNot=function(member){if(this.proxy)return this.getProxy().memberNot(member);this.put("memberNot", "not");this.put("member", member);return this;};
		
		
	this.memberIn=function(ids){
		if(this.proxy)return this.getProxy().memberIn(ids);  this.put("memberIn", ids);return this;
	};	
		 
	
	
	/** 会员名称        **/
	this.nickName=function(nickName){if(this.proxy)return this.getProxy().nickName(nickName);  this.put("nickName", nickName);return this;};
	/** and nick_name is null */
	this.nickNameNull=function(){if(this.proxy)return this.getProxy().nickNameNull();if(this.get("nickNameNot")==null)this.put("nickNameNot", "");this.put("nickName", null);return this;};
	/** not .... */
	this.nickNameNot=function(){if(this.proxy)return this.getProxy().nickNameNot();this.put("nickNameNot", "not");return this;};
	this.nickNameNotNull=function(){if(this.proxy)return this.getProxy().nickNameNotNull();this.put("nickNameNot", "not");this.put("nickName", null);return this;};
	this.nickNameNot=function(nickName){if(this.proxy)return this.getProxy().nickNameNot(nickName);this.put("nickNameNot", "not");this.put("nickName", nickName);return this;};
		
		 
	
	
	/** 提货时间        **/
	this.deliveryTime=function(deliveryTime){if(this.proxy)return this.getProxy().deliveryTime(deliveryTime);  this.put("deliveryTime", deliveryTime);return this;};
	/** and delivery_time is null */
	this.deliveryTimeNull=function(){if(this.proxy)return this.getProxy().deliveryTimeNull();if(this.get("deliveryTimeNot")==null)this.put("deliveryTimeNot", "");this.put("deliveryTime", null);return this;};
	/** not .... */
	this.deliveryTimeNot=function(){if(this.proxy)return this.getProxy().deliveryTimeNot();this.put("deliveryTimeNot", "not");return this;};
	this.deliveryTimeNotNull=function(){if(this.proxy)return this.getProxy().deliveryTimeNotNull();this.put("deliveryTimeNot", "not");this.put("deliveryTime", null);return this;};
	this.deliveryTimeNot=function(deliveryTime){if(this.proxy)return this.getProxy().deliveryTimeNot(deliveryTime);this.put("deliveryTimeNot", "not");this.put("deliveryTime", deliveryTime);return this;};
		
		 
	
	
	/** 经度        **/
	this.longitude=function(longitude){if(this.proxy)return this.getProxy().longitude(longitude);  this.put("longitude", longitude);return this;};
	/** and longitude is null */
	this.longitudeNull=function(){if(this.proxy)return this.getProxy().longitudeNull();if(this.get("longitudeNot")==null)this.put("longitudeNot", "");this.put("longitude", null);return this;};
	/** not .... */
	this.longitudeNot=function(){if(this.proxy)return this.getProxy().longitudeNot();this.put("longitudeNot", "not");return this;};
	this.longitudeNotNull=function(){if(this.proxy)return this.getProxy().longitudeNotNull();this.put("longitudeNot", "not");this.put("longitude", null);return this;};
	this.longitudeNot=function(longitude){if(this.proxy)return this.getProxy().longitudeNot(longitude);this.put("longitudeNot", "not");this.put("longitude", longitude);return this;};
		
		 
	
	
	/** 纬度        **/
	this.latitude=function(latitude){if(this.proxy)return this.getProxy().latitude(latitude);  this.put("latitude", latitude);return this;};
	/** and latitude is null */
	this.latitudeNull=function(){if(this.proxy)return this.getProxy().latitudeNull();if(this.get("latitudeNot")==null)this.put("latitudeNot", "");this.put("latitude", null);return this;};
	/** not .... */
	this.latitudeNot=function(){if(this.proxy)return this.getProxy().latitudeNot();this.put("latitudeNot", "not");return this;};
	this.latitudeNotNull=function(){if(this.proxy)return this.getProxy().latitudeNotNull();this.put("latitudeNot", "not");this.put("latitude", null);return this;};
	this.latitudeNot=function(latitude){if(this.proxy)return this.getProxy().latitudeNot(latitude);this.put("latitudeNot", "not");this.put("latitude", latitude);return this;};
		
		 
	
	
	/** 条款情况    1:同意 2:不同意     **/
	this.termsConditions=function(termsConditions){if(this.proxy)return this.getProxy().termsConditions(termsConditions);  this.put("termsConditions", termsConditions);return this;};
	/** and terms_conditions is null */
	this.termsConditionsNull=function(){if(this.proxy)return this.getProxy().termsConditionsNull();if(this.get("termsConditionsNot")==null)this.put("termsConditionsNot", "");this.put("termsConditions", null);return this;};
	/** not .... */
	this.termsConditionsNot=function(){if(this.proxy)return this.getProxy().termsConditionsNot();this.put("termsConditionsNot", "not");return this;};
	this.termsConditionsNotNull=function(){if(this.proxy)return this.getProxy().termsConditionsNotNull();this.put("termsConditionsNot", "not");this.put("termsConditions", null);return this;};
	this.termsConditionsNot=function(termsConditions){if(this.proxy)return this.getProxy().termsConditionsNot(termsConditions);this.put("termsConditionsNot", "not");this.put("termsConditions", termsConditions);return this;};
		
		
	this.termsConditionsIn=function(ids){
		if(this.proxy)return this.getProxy().termsConditionsIn(ids);  this.put("termsConditionsIn", ids);return this;
	};	
		 
	
	
	/** 资料完善    1:未完善 2:已完善     **/
	this.perfectSituation=function(perfectSituation){if(this.proxy)return this.getProxy().perfectSituation(perfectSituation);  this.put("perfectSituation", perfectSituation);return this;};
	/** and perfect_situation is null */
	this.perfectSituationNull=function(){if(this.proxy)return this.getProxy().perfectSituationNull();if(this.get("perfectSituationNot")==null)this.put("perfectSituationNot", "");this.put("perfectSituation", null);return this;};
	/** not .... */
	this.perfectSituationNot=function(){if(this.proxy)return this.getProxy().perfectSituationNot();this.put("perfectSituationNot", "not");return this;};
	this.perfectSituationNotNull=function(){if(this.proxy)return this.getProxy().perfectSituationNotNull();this.put("perfectSituationNot", "not");this.put("perfectSituation", null);return this;};
	this.perfectSituationNot=function(perfectSituation){if(this.proxy)return this.getProxy().perfectSituationNot(perfectSituation);this.put("perfectSituationNot", "not");this.put("perfectSituation", perfectSituation);return this;};
		
	/** and perfect_situation <= ? */
	this.perfectSituationMin=function(min){if(this.proxy)return this.getProxy().perfectSituationMin(min);this.put("perfectSituationMin", min);return this;};
	/** and perfect_situation >= ? */
	this.perfectSituationMax=function(max){if(this.proxy)return this.getProxy().perfectSituationMax(max);this.put("perfectSituationMax", max);return this;};
		
		
	this.perfectSituationIn=function(ids){
		if(this.proxy)return this.getProxy().perfectSituationIn(ids);  this.put("perfectSituationIn", ids);return this;
	};	
		 
	
	
	/** 坐标地址        **/
	this.coordinateAddress=function(coordinateAddress){if(this.proxy)return this.getProxy().coordinateAddress(coordinateAddress);  this.put("coordinateAddress", coordinateAddress);return this;};
	/** and coordinate_address is null */
	this.coordinateAddressNull=function(){if(this.proxy)return this.getProxy().coordinateAddressNull();if(this.get("coordinateAddressNot")==null)this.put("coordinateAddressNot", "");this.put("coordinateAddress", null);return this;};
	/** not .... */
	this.coordinateAddressNot=function(){if(this.proxy)return this.getProxy().coordinateAddressNot();this.put("coordinateAddressNot", "not");return this;};
	this.coordinateAddressNotNull=function(){if(this.proxy)return this.getProxy().coordinateAddressNotNull();this.put("coordinateAddressNot", "not");this.put("coordinateAddress", null);return this;};
	this.coordinateAddressNot=function(coordinateAddress){if(this.proxy)return this.getProxy().coordinateAddressNot(coordinateAddress);this.put("coordinateAddressNot", "not");this.put("coordinateAddress", coordinateAddress);return this;};
		
		 
	
	
	/** 审核意见        **/
	this.auditOpinion=function(auditOpinion){if(this.proxy)return this.getProxy().auditOpinion(auditOpinion);  this.put("auditOpinion", auditOpinion);return this;};
	/** and audit_opinion is null */
	this.auditOpinionNull=function(){if(this.proxy)return this.getProxy().auditOpinionNull();if(this.get("auditOpinionNot")==null)this.put("auditOpinionNot", "");this.put("auditOpinion", null);return this;};
	/** not .... */
	this.auditOpinionNot=function(){if(this.proxy)return this.getProxy().auditOpinionNot();this.put("auditOpinionNot", "not");return this;};
	this.auditOpinionNotNull=function(){if(this.proxy)return this.getProxy().auditOpinionNotNull();this.put("auditOpinionNot", "not");this.put("auditOpinion", null);return this;};
	this.auditOpinionNot=function(auditOpinion){if(this.proxy)return this.getProxy().auditOpinionNot(auditOpinion);this.put("auditOpinionNot", "not");this.put("auditOpinion", auditOpinion);return this;};
		
		 
	
	
	/** formId        **/
	this.dFormid=function(dFormid){if(this.proxy)return this.getProxy().dFormid(dFormid);  this.put("dFormid", dFormid);return this;};
	/** and d_formid is null */
	this.dFormidNull=function(){if(this.proxy)return this.getProxy().dFormidNull();if(this.get("dFormidNot")==null)this.put("dFormidNot", "");this.put("dFormid", null);return this;};
	/** not .... */
	this.dFormidNot=function(){if(this.proxy)return this.getProxy().dFormidNot();this.put("dFormidNot", "not");return this;};
	this.dFormidNotNull=function(){if(this.proxy)return this.getProxy().dFormidNotNull();this.put("dFormidNot", "not");this.put("dFormid", null);return this;};
	this.dFormidNot=function(dFormid){if(this.proxy)return this.getProxy().dFormidNot(dFormid);this.put("dFormidNot", "not");this.put("dFormid", dFormid);return this;};
		
		 
	
	
	/** 修改时间 [非空]       **/
	this.updateTime=function(updateTime){if(this.proxy)return this.getProxy().updateTime(updateTime);  this.put("updateTime", updateTime);return this;};
	/** and update_time is null */
	this.updateTimeNull=function(){if(this.proxy)return this.getProxy().updateTimeNull();if(this.get("updateTimeNot")==null)this.put("updateTimeNot", "");this.put("updateTime", null);return this;};
	/** not .... */
	this.updateTimeNot=function(){if(this.proxy)return this.getProxy().updateTimeNot();this.put("updateTimeNot", "not");return this;};
	this.updateTimeNotNull=function(){if(this.proxy)return this.getProxy().updateTimeNotNull();this.put("updateTimeNot", "not");this.put("updateTime", null);return this;};
	this.updateTimeNot=function(updateTime){if(this.proxy)return this.getProxy().updateTimeNot(updateTime);this.put("updateTimeNot", "not");this.put("updateTime", updateTime);return this;};
		
	/** and update_time >= ? */
	this.updateTimeStart=function(start){if(this.proxy)return this.getProxy().updateTimeStart(start);this.put("updateTimeStart", start);return this;};			
	/** and update_time <= ? */
	this.updateTimeEnd=function(end){if(this.proxy)return this.getProxy().updateTimeEnd(end);this.put("updateTimeEnd", end);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.addTime=function(addTime){if(this.proxy)return this.getProxy().addTime(addTime);  this.put("addTime", addTime);return this;};
	/** and add_time is null */
	this.addTimeNull=function(){if(this.proxy)return this.getProxy().addTimeNull();if(this.get("addTimeNot")==null)this.put("addTimeNot", "");this.put("addTime", null);return this;};
	/** not .... */
	this.addTimeNot=function(){if(this.proxy)return this.getProxy().addTimeNot();this.put("addTimeNot", "not");return this;};
	this.addTimeNotNull=function(){if(this.proxy)return this.getProxy().addTimeNotNull();this.put("addTimeNot", "not");this.put("addTime", null);return this;};
	this.addTimeNot=function(addTime){if(this.proxy)return this.getProxy().addTimeNot(addTime);this.put("addTimeNot", "not");this.put("addTime", addTime);return this;};
		
	/** and add_time >= ? */
	this.addTimeStart=function(start){if(this.proxy)return this.getProxy().addTimeStart(start);this.put("addTimeStart", start);return this;};			
	/** and add_time <= ? */
	this.addTimeEnd=function(end){if(this.proxy)return this.getProxy().addTimeEnd(end);this.put("addTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   0:审核中 1:审核通过 2:审核拒绝 3:禁用账号     **/
	this.status=function(status){if(this.proxy)return this.getProxy().status(status);  this.put("status", status);return this;};
	/** and status is null */
	this.statusNull=function(){if(this.proxy)return this.getProxy().statusNull();if(this.get("statusNot")==null)this.put("statusNot", "");this.put("status", null);return this;};
	/** not .... */
	this.statusNot=function(){if(this.proxy)return this.getProxy().statusNot();this.put("statusNot", "not");return this;};
	this.statusNotNull=function(){if(this.proxy)return this.getProxy().statusNotNull();this.put("statusNot", "not");this.put("status", null);return this;};
	this.statusNot=function(status){if(this.proxy)return this.getProxy().statusNot(status);this.put("statusNot", "not");this.put("status", status);return this;};
		
		
	this.statusIn=function(ids){
		if(this.proxy)return this.getProxy().statusIn(ids);  this.put("statusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有配送商信息 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/delivery/distributor.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取配送商信息分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/delivery/distributor.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取配送商信息 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/delivery/distributor.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

Distributor.get = function(id){
	var protocol = ux.ajax("/admin/delivery/distributor.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.distributor;
	return null;
}

Distributor.where = new Distributor.Where(0,true);